﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MODEL;

namespace Service
{
    public class UserService_Design : IUserService
    {
        public Task<IEnumerable<User>> GetUsersAsync(UserQueryCriteria criteria = null)
        {
            return Task.Run(() =>
            {
                return new List<User> {
                    new User{
                        Id = 1
                    }
                }.AsEnumerable();
            });
        }

        public Task<IEnumerable<string>> QueryUserIndustry()
        {
            return Task.Run<IEnumerable<string>>(() =>
            {
                return new List<string> { "农业", "IT", "金融" }.AsEnumerable();
            });
        }

        public bool LogOn(string account, string password)
        {
            return true;
        }

        public bool ExistUser(string account) { return false; }

        public Task<int> AddUser(string account, string password, string userName)
        {
            throw new NotImplementedException();
        }

        public Task<int> DeleteUser(int userId)
        {
            throw new NotImplementedException();
        }

        public Task<int> UpdateUserState(int userId, string state)
        {
            throw new NotImplementedException();
        }

        public Task<Role> GetRole(int userId)
        {
            throw new NotImplementedException();
        }
    }
}
